package cn.wsalix.sys.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import cn.anlaser.entity.CommonEntity;

/**
 * @author jskyme
 * Api 访问记录
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "API_DEFINE")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@EntityListeners({ AuditingEntityListener.class })
@Data
@EqualsAndHashCode(exclude = {}, callSuper = false)
@ToString(exclude = {})
public class ApiDefine extends CommonEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = -3947000995163652460L;
	private String apiName;//api地址
	private String argument;//参数
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date lastTime;//记录最后时间
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date visitTime;//访问时间
}